﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using TaoSH.AppCode;



namespace TaoSH.View
{

    public partial class ISOView : Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                RpTypeBind();
            }
        }

        /// <summary>
        /// TODO:还没做完，需要加上技术人员的产值计算
        /// </summary>
        protected void querydata()
        {
            //DataTable dt = new DataTable();
            //dt = new KS_GWPY_ContentB().GetDTByCommand(" SELECT ([jszdfs]+[jspxfs]+[jsswfs]) AS GZTD,jsczfs, jswzfs, jsyjfs, jsjzfs,([jszdfs]+[jspxfs]+[jsswfs]+jsczfs+jswzfs+jsyjfs+jsjzfs) AS HJFS, KHPeopleName FROM KS_GWPY_Content  WHERE  Remark2 LIKE 'J' AND KHYear='" + txtND.Text + "'");
            //rptJSGWCZ.DataSource = dt;
            //rptJSGWCZ.DataBind();
        }

        protected void btQuery_Click(object sender, EventArgs e)
        {
            querydata();
        }

        private void RpTypeBind()
        {
            //this.rptypelist.DataSource = new Pro_ISOWJB().GetDTByCommand(" SELECT DISTINCT WJTpye FROM Pro_ISOWJ ");
            //this.rptypelist.DataBind();
        }
        protected void rptypelist_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {

           
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                Repeater rep = e.Item.FindControl("rpquestionlist") as Repeater;//找到里层的repeater对象
                DataRowView rowv = (DataRowView)e.Item.DataItem;//找到分类Repeater关联的数据项 
                string  typename = rowv[0].ToString(); //获取填充子类的id 
                //rep.DataSource = new Pro_ISOWJB().GetEntities(D => D.IsComPlete == "Y" && D.WJTpye == typename);
                //rep.DataBind();
            }
        }
    }
}